﻿namespace Shortcuts.Convertors
{
    using Shortcuts.Common;
    using Shortcuts.Globalization;
    using System;
    using System.Windows;
    using System.Windows.Data;

    public class SettingsConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            Settings settings = (Settings)value;

            return Localized.Get(settings.Named(), culture);
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            return DependencyProperty.UnsetValue;
        }
    }
}
